<template>
<!--  <div class="home">-->
<!--    <img alt="Vue logo" src="../assets/logo.png">-->
<!--    <HelloWorld msg="Welcome to Your Vue.js App"/>-->
<!--  </div>-->
  <div>
    <div class="item">用户名: {{admin.username}}</div>
    <div class="item">手机号: {{admin.phone}}</div>
    <div class="item">邮箱: {{admin.email}}</div>
  </div>
</template>

<script>
// @ is an alias to /srcs

import Cookies from 'js-cookie'
import request from "@/utils/request";

export default {
  data(){
    return {
      admin: Cookies.get('admin') ? JSON.parse(Cookies.get('admin')) :{}
    }
  },
  created() {
    // console.log(JSON.parse(Cookies.get('admin')))
    //在首页做一个展示用
    // request.get('/admin'+this.admin.id).then(res => {
    //   this.admin=res.data
    // })
  }
}
</script>

<style>
.item{
  margin:10px 5px;
  color: #666;
}

</style>